package com.mdd.common.enums;

import com.google.common.collect.Maps;

import java.util.Map;

public enum OrderPayStatusEnum {
    //支付状态;0-待支付;1-已支付;
    WAIT_PAY(0, "待支付"),
    PAY(1, "已支付");

    private final int status;
    private final String desc;

    OrderPayStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    /**
     * 获取状态码
     *
     * @return Long
     * @author fzr
     */
    public int getStatus() {
        return this.status;
    }

    /**
     * 获取提示
     *
     * @return String
     * @author fzr
     */
    public String getDesc() {
        return this.desc;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = Maps.newHashMap();
        for (OrderPayStatusEnum codeEnum : OrderPayStatusEnum.values()) {
            map.put(codeEnum.status, codeEnum.desc);
        }
        return map;
    }
}
